package com.beaut.project.util;

import java.util.HashMap;
import java.util.Map;

public class StaticData {
	//财务的凭证类型
	public static int Proof_Company = 1;//来自公司账户(id为finance_company_log的id)
	public static int Proof_Self_Request = 2;//来自工余库材料申请(id为gd_self_request id)
	public static int Proof_Self_DB_Out = 3;//来自工余库材料出库收入(id为db_log id)
	public static int Proof_LOAN_Out = 4;//来自工单员工借款单支出(id为loan id)
	public static int Proof_Advances_Out = 5;//来自工单班组垫款支出(id为advances id)
	public static int Proof_Yet_Advances_IN = 6;//来自工单班组垫款还款收入(id为voucher_id)
	public static int Proof_FB_Yet_Advances_IN = 9;//来自分包进度/结算垫款还款收入(id为voucher_id)
	public static int Proof_REM = 7;//项目正常报销支出
	public static int Proof_REM_LOAN = 8;//项目工单借款销账
	public static int Proof_Finance_Commons = 9;//公共费用报销
	
	public static int Proof_XM_WORKER_PAY = 20;//来自项目施工进度还款
	public static int Proof_XM_SUPPLY_PAY = 21;//来自项目采购进度还款
	public static int Proof_XM_EARN = 22;//来自项目甲方进度收款
	public static int Proof_XM_EVAL = 23;//来自项目经济考评
	public static int Proof_COMMONS = 24;//公共费用放款
	public static int Proof_OUTLOAN = 25;//借款
	public static int Proof_INLOAN = 26;//还款
	public static int Proof_EMPLOYEE_LOAN = 10;//员工借款
	public static int Proof_EMPLOYEE_YET_LOAN = 12;//员工还款
	public static int Proof_WORKER_LOAN = 11;//分包借款
	//财务中的流水类型
	public static int DEFAULT = 0;//期初入账
	public static int FINANCE_IN = 1;//收入
	public static int FINANCE_OUT = 2;//支出
	//库存日志中的流水类型
	public static int DB_IN = 0;//入库
	public static int DB_OUT = 1;//出库
	
	public static String OPERATION_DATE_FORMATTER = "yyyy-MM-dd HH:mm:ss";
	public static String DATE_FORMATTER = "yyyy-MM-dd";
	//库存日志，对应业务类型
	public static int DB_INIT = 0;//库存初始化，期初入库
	public static int GD_SELF_REQUEST = 1;//工单领工余库料（仓库日志对象：工余库）
	public static int GD_RECOVERY = 2;//工单拆旧回收工余库（仓库日志对象：工余库）
	public static int GD_BORROW_CUSTOMER = 3;//工单借客户库料（仓库日志对象：客户库）
	public static int GD_RETURN_CUSTOMER = 4;//工单还客户库料（仓库日志对象：客户库）
	public static int GD_BORROW_SELF = 5;//工单借工余库料（仓库日志对象：工余库）
	public static int GD_REQUEST_FOR_CUSTOMER_RETURN = 6;//工单领项目库料，用于还客户库（仓库日志对象：项目库）
	public static int GD_BORROW_SELF_RETURN = 7;//工单领项目库料，用于还工余库（仓库日志对象：项目库）
	public static int GD_BALANCE_OUT = 30;//平衡审核后，订单余料入工余库（仓库日志对象：订单库）
	public static int GD_BALANCE_IN = 31;//平衡审核后，订单余料入工余库（仓库日志对象：工余库）
	public static int XM_JS_IN = 32;//平衡审核后，甲供库余料入工余库（仓库日志对象：工余库）
	public static int XM_JS_OUT = 33;//平衡审核后，甲供库余料入工余库（仓库日志对象：甲供库）
	public static int XM_JG_OUT_DB=21;//项目甲供材领料出库
	public static int CP_CUST_IN=22;//客户库产品入库
	public static int CP_SUPPLIER_IN=23;//厂家库产品入库
	public static int CP_INVENTORY_IN=24;//盘点（盘盈）入库
	public static int CP_INVENTORY_OUT=25;//盘点（盘亏）出库
	public static int GD_SUPPLISER_GY=26;//厂家余料入工余
	//库存日志，对应业务类型摘要描述
	public static Map<String,String> summary = new HashMap<String,String>();
	static{
		summary.put(String.valueOf(DB_INIT),"期初入库");
	}
	public static int GD_PRODUCT_IN = 7;//订货单入库（仓库日志对象：订单料库）
	public static int GD_PURCHASE_APPLY_USE = 8;//采购领料出库（仓库日志对象：订单料库）
	public static int GD_RETURN_APPLY = 11;//退料入库
	public static int GD_SUPPLIER_APPLY = 9;//领厂家库料（仓库日志对象：厂家库）
	public static int XM_JG_IN_DB=20;//项目甲供材入库 （仓库日志对象：项目库）
	public static int XM_JGC_OUT_DB=29;//项目甲供材出库 （仓库日志对象：项目库）
	
	//附件的上传目录
//	public static String UPLOAD_HOME = "D:\\project";
	public static String UPLOAD_HOME = "/usr/local/tomcat/attach/project";
	public static String GD_MODULE = "gongdan";//工单
	public static String XM_MODULE = "xiangmu";//项目
	//工单附件类型
	public static int GD_CONTENT = 0;//工单内容
	public static int GD_DESCRIPTION = 1;//工单交底
	public static int GD_PROCESS = 2;//工单进程
	public static int GD_SECURITY = 3;//工单安质
	public static int GD_LOAN = 4;//工单借款
	public static int GD_ADVANCES= 5;//工单垫款分包商
	public static int GD_YET_ADVANCES= 5;//工单垫款分包商
	public static int GD_SUPPLIER = 6;//工单付款供货商
	//项目附件类型
	public static int XM_BASE = 0;//项目内容
	public static int XM_LY = 1;//项目履约
	public static int XM_BZ = 2;//项目报账
	public static int XM_SP = 3;//项目收票
	public static int XM_CHECK = 4;//项目验收
	public static int XM_EVALUATION = 5;//项目验收
	public static int XM_CONTRACT = 6;//项目合同
	//审批的四种状态
	public static int NEW_CREATE = 0;//新建
	public static int AUDITING = 1;//审核中
	public static int NO_PASS = 2;//审核未过
	public static int PASS = 3;//审核通过
	
	//是否置顶
	public static int TOPTRUE=2;//置顶
	public static int TOPFALSE=1;//不置顶
	//实际放款状态
	public static int NOACTUAL=0;//未放款
	public static int ACTUAL=1;//放款成功
	
	public static Map<String,String> ADUIT_STATUS = new HashMap<String,String>();
	static{
		ADUIT_STATUS.put(String.valueOf(NEW_CREATE),"新建");
		ADUIT_STATUS.put(String.valueOf(AUDITING),"审核中");
		ADUIT_STATUS.put(String.valueOf(NO_PASS),"审核未过");
		ADUIT_STATUS.put(String.valueOf(PASS),"审核通过");
	}
	public static Map<String,String> DESCRIPTION_STATUS = new HashMap<String,String>();
	static{
		DESCRIPTION_STATUS.put(String.valueOf(NEW_CREATE),"未确定");
		DESCRIPTION_STATUS.put(String.valueOf(AUDITING),"确定中");
		DESCRIPTION_STATUS.put(String.valueOf(NO_PASS),"不通过");
		DESCRIPTION_STATUS.put(String.valueOf(PASS),"已确定");
	}
	public static Map<String,String> ACTUAL_STATUS = new HashMap<String,String>();
	static{
		ACTUAL_STATUS.put(String.valueOf(NOACTUAL),"未放款");
		ACTUAL_STATUS.put(String.valueOf(ACTUAL),"放款成功");
	}
	//工单状态
	public static int START = 0;//派工单发起
	public static int START_ADD = 1;//派工单发起(变更)
	public static int DESCRIPTION = 2;//现场交底
	public static int DESCRIPTION_ADD = 3;//现场交底(变更)
	public static int WORKING = 4;//施工中
	public static int FINISHED = 5;//工单完成---没有用到，该属性作废
	public static int ACCOUTING = 6;//发起核算
	public static int FREEZE = 7;//成本固化
	public static int CLOSED = 8;//关闭
	
	public static Map<String,String> GD_STATUS = new HashMap<String,String>();
	static{
		GD_STATUS.put(String.valueOf(START),"派工单发起");
		GD_STATUS.put(String.valueOf(START_ADD),"派工单发起(变更)");
		GD_STATUS.put(String.valueOf(DESCRIPTION),"现场交底");
		GD_STATUS.put(String.valueOf(DESCRIPTION_ADD),"现场交底(变更)");
		GD_STATUS.put(String.valueOf(WORKING),"施工中");
		GD_STATUS.put(String.valueOf(FINISHED),"工单完成");
		GD_STATUS.put(String.valueOf(ACCOUTING),"发起核算");
		GD_STATUS.put(String.valueOf(FREEZE),"成本固化");
		GD_STATUS.put(String.valueOf(CLOSED),"关闭");
	}
	
	//项目进度状态1、未开工 2在建 3完工 4验收 5送审 6开票 7结算
	public static int NOSTART = 1;//未开工
	public static int ONLINECREATE = 2;//在建
	public static int FINISH = 3;//完工 
	public static int CHECK = 4;//验收
	public static int SUBMISSION = 5;//送审
	public static int INVOICE = 6 ;//开票 
	public static int SETTLE = 7;//结算
	public static int PROCESS_CLOSE = 8;//关闭
	
	public static Map<String,String> XM_PROCESS_STATUS = new HashMap<String,String>();
	static{
		XM_PROCESS_STATUS.put(String.valueOf(NOSTART),"未开工");
		XM_PROCESS_STATUS.put(String.valueOf(ONLINECREATE),"在建");
		XM_PROCESS_STATUS.put(String.valueOf(FINISH),"完工");
		XM_PROCESS_STATUS.put(String.valueOf(CHECK),"验收");
		XM_PROCESS_STATUS.put(String.valueOf(SUBMISSION),"送审");
		XM_PROCESS_STATUS.put(String.valueOf(INVOICE),"开票 ");
		XM_PROCESS_STATUS.put(String.valueOf(SETTLE),"结算");
		XM_PROCESS_STATUS.put(String.valueOf(PROCESS_CLOSE),"关闭");
	}
	
	//项目开票常量
	public static int COMPANY_SELF_OUT_INVOICE = 0;//公司开票类型
	public static int WORKER_OUT_INVOICE = 1;//分包商开票类型
	//CRM应收应付日志对应的业务类型
	public static int CRM_SUPPLIER_PRODUCT_IN = 0;//采购入库，引起供货商对应的工单应付变化，对应业务id为入库单
	public static int CRM_SUPPLIER_BC_PRODUCT = 10;//领用厂家库，补采购单，引起供货商对应工单应付变化，对应业务id为补采购单id
	public static int GD_BALANCE = 1;//工单成本固化引起的分包商应付变化，对应业务id为工单id
	public static int XM_INVOICE_OUT = 2;//项目开票，对应客户的应收增加，对应业务id为开票id
	public static int XM_FINANCE_IN = 3;//项目收款,对应业务id为收款id
	public static int XM_SUPPLIER_PROCESS_FINANCE_OUT = 4;//采购商项目进度付款,对应业务id为付款id
	public static int XM_WORKER_PROCESS_FINANCE_OUT = 5;//分包商项目进度付款,对应业务id为付款id
	
	public static int XM_SUPPLIER_END_FINANCE_OUT = 6;//采购商项目结算付款,对应业务id为项目id
	public static int XM_WORKER_END_FINANCE_OUT = 7;//分包商项目结算付款,对应业务id为项目id
	public static int XM_FINANCE_END_IN = 8;//项目收款结算,对应业务id为项目id
	public static int XM_FINANCE_WARRANTY = 9;//项目质保金 id对应项目id
	
	
	//进度支付与收款表对应的记录
	public static int PAY_JD = 0;//进度支付
	public static int PAY_JS = 1;//结算支付
	public static int INMONEY_JD = 0;//进度收款
	public static int INMONEY_JS = 1;//结算收款
	public static int INMONEY_ZB = 2;//质保收款
	
	/**
	 * 项目xm_base xm_business_type&0x000000c0=0x000000c0
			0xFFFFFFFF--用bit位来代表业务
	审核通过(0x00000001)，
	履约管理(0x00000002)，
	进度付款(0x00000004)，
	进度收款(0x00000008)，
	验收通过(0x00000010)，
	材料平衡通过(0x00000020)，
	结算收入(0x00000040)，
	结算支付(0x00000080),
	考评完成    (0x00000100)，
	项目关闭(0x00000200),
	项目质保金回收(0x00000400),
	结算开票(0x00000800),
	结算采购款终结(0x00001000),
	结算分包款终结(0x00002000),
	*/
	public static  long XM_INIT_PASS=0x00000001;
	public static  long XM_HAS_LY=   0x00000002;
	public static  long XM_HAS_JDFK= 0x00000004;
	public static  long XM_HAS_JDSK= 0x00000008;
	public static  long XM_HAS_YS=   0x00000010;
	public static  long XM_HAS_CLPH= 0x00000020;
	public static  long XM_HAS_JSSR= 0x00000040;
	public static  long XM_HAS_JSZF= 0x00000080;
	public static  long XM_HAS_JJKP= 0x00000100;	
	public static  long XM_HAS_CLOSE=0x00000200;	
	public static  long XM_HAS_ZBJ=0x00000400;	
	public static  long XM_HAS_JSKP=0x00000800;	
	public static  long XM_HAS_JSCGEND=0x00001000;
	public static  long XM_HAS_JSFBEND=0x00002000;	
}
